
import {
	$api,
	$config
} from '@/api/request/index.js'

/**
 * 分页查询
 * @param {Object} data
 */
export function getPage(data) {
	return $api({
		url: $config.bmsURL + '/blog/collection/getPage',
		method: 'get',
		data: data,
	})
}

/**
 * 添加
 * @param {Object} data
 */
export function add(data) {
	return $api({
		url: $config.bmsURL + '/blog/collection/add',
		method: 'post',
		data: data,
	})
}

/**
 * 修改
 * @param {Object} data
 */
export function modify(data) {
	return $api({
		url: $config.bmsURL + '/blog/collection/modify',
		method: 'post',
		data: data,
	})
}

/**
 * 查询收藏
 * @param {Object} data
 */
export function get(data) {
	return $api({
		url: $config.bmsURL + '/blog/collection/get',
		method: 'get',
		data: data,
	})
}

/**
 * 删除
 * @param {Object} data
 */
export function del(data) {
	return $api({
		url: $config.bmsURL + '/blog/collection/del',
		method: 'post',
		data: data,
	})
}

/**
 * 清空
 * @param {Object} data
 */
export function clear() {
	return $api({
		url: $config.bmsURL + '/blog/collection/clear',
		method: 'post'
	})
}
